package app.myteamapplication;

import android.media.MediaPlayer;
import android.support.v7.app.ActionBarActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;

public class MainActivity extends ActionBarActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        final MediaPlayer mpButtonClick = MediaPlayer.create(this, R.raw.button_click);

        final MainApplication globalVariable = (MainApplication) getApplicationContext();

        ImageButton cont1 = (ImageButton) findViewById(R.id.button1);
        cont1.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
                startActivity (new Intent (".MAPA"));
                mpButtonClick.start();
            }
        });
        ImageButton cont2 = (ImageButton) findViewById(R.id.button2);
        cont2.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
                startActivity (new Intent (".MENU"));
                mpButtonClick.start();

            }
        });
        ImageButton cont3 = (ImageButton) findViewById(R.id.button3);
        cont3.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
                startActivity (new Intent (".CONTACTO"));
                mpButtonClick.start();

            }
        });
   }}
